import { createStore, compose, applyMiddleware } from 'redux'
// 使用thunk redux的中间件 可用将 action creator 的返回值变为函数
import thunk from 'redux-thunk'
// 引入仓库
import reducer from './reducer';

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(reducer, composeEnhancers(applyMiddleware(thunk)))

export default store
